﻿<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Default.aspx.vb" Inherits="HausaMathTermdev._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">


    <asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource3">
        <Series>
            <asp:Series Name="Series1" YValuesPerPoint="2" XValueMember="Mathterm" 
                YValueMembers="LikeCount" ChartType="Bar">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>

    <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
    ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
    SelectCommand="SELECT [LikeCount], [Mathterm], [TermID] FROM [CountLikes]"></asp:SqlDataSource>


    <br />
    <br />


    <asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="TermID" 
        datasourceid="SqlDataSource2" Width="100%">
        <Columns>
            <asp:BoundField DataField="Hausaterm" HeaderText="Hausa Term" 
                SortExpression="Hausaterm">
            <ControlStyle CssClass="fontsize" Font-Bold="False" />
            <HeaderStyle CssClass="fontsize" HorizontalAlign="Center" 
                VerticalAlign="Middle" />
            </asp:BoundField>
            <asp:HyperLinkField DataNavigateUrlFields="TermID" 
                DataNavigateUrlFormatString="details.aspx?TermID={0}" DataTextField="Mathterm" 
                HeaderText="Math Term" SortExpression="Mathterm" />
            <asp:ImageField DataAlternateTextField="PictureSymbol" 
                DataImageUrlField="PictureSymbol" DataImageUrlFormatString="/image/{0}" 
                HeaderText=" Thumbnail" SortExpression="PictureSymbol">
                <ControlStyle CssClass="Thumbnail" />
                <ItemStyle CssClass="Thumbnail" />
            </asp:ImageField>
            <asp:BoundField DataField="Author" HeaderText="Author" 
                SortExpression="Author" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        SelectCommand="SELECT [TermID], [Mathterm], [Hausaterm], [Definition], [PictureSymbol], [SiteAdd], [Remark], [Category], [Author], [DDate] FROM [Terms] WHERE ([Category] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="Category" QueryStringField="Category" 
                Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" 
    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
    DataKeyNames="TermID" Width= "100%">
        <Columns>
            <asp:BoundField DataField="Hausaterm" HeaderText="Hausa Term" 
                SortExpression="Hausaterm" >
            <ControlStyle CssClass="fontsize" Font-Bold="False" />
            <HeaderStyle CssClass="fontsize" HorizontalAlign="Center" 
                VerticalAlign="Middle" />
            </asp:BoundField>
            <asp:HyperLinkField DataNavigateUrlFields="TermID" 
                DataNavigateUrlFormatString="details.aspx?TermID={0}" 
                DataTextField="Mathterm" HeaderText="Math Term" SortExpression="Mathterm" />
            <asp:ImageField DataAlternateTextField="PictureSymbol" 
                DataImageUrlField="PictureSymbol" DataImageUrlFormatString="/image/{0}" 
                HeaderText=" Thumbnail" SortExpression="PictureSymbol">
                <ControlStyle CssClass="Thumbnail" />
                <ItemStyle CssClass="Thumbnail" />
            </asp:ImageField>
            <asp:BoundField DataField="Author" HeaderText="Author" 
                SortExpression="Author" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        
        
        SelectCommand="SELECT [TermID], [Mathterm], [Hausaterm], [Definition], [PictureSymbol], [SiteAdd], [Remark], [Category], [Author], [DDate] FROM [Terms] ">
    </asp:SqlDataSource>
    </asp:Content>
